package test;

import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        char c = moreString(str);
        System.out.println(c);
    }
    public static char moreString(String str) {
        char[] chars = str.toCharArray();
        int length = chars.length;
        HashMap map = new HashMap();
        int temp = 1;
        char result = 0;
        for (int i = 0; i < length; i++) {
            char key = chars[i];
            if (map.containsKey(key)) {
                int value = (int) map.get(key);
                value = value + 1;
                if (value > temp) {
                    temp = value;
                    result = key;
                }
            }
            map.put(chars[i], 1);
        }
        return result;
    }
}

